<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>当前贷款信息</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../../../layui/css/layui.css" media="all">
<script type="text/javascript" src="../../../layui/lay/modules/layer.js"></script>
<script src="../../../layui/jquery-3.2.1.min.js" charset="utf-8"></script>
<script src="../../../layui/layui.js" charset="utf-8"></script>
 <link rel="stylesheet" href="../../../layui/css/layui.css"/>
 <link rel="stylesheet" href="../../../layui/admin/admin.css"/>
 <script src="../../../js/angular.js" charset="utf-8"></script>
 <script type="text/javascript" src="../../../layui/layui.js"></script>
 <script type="text/javascript" src="../../../layui/admin/admin.js"></script>
 <link rel="stylesheet" href="../../../layui/css/layui.css"/>
 <style>
      .layui-form-label{
	        text-align: left;
	        width:130px;
	        height:30px;
     }
</style>
</head>
<body>
	<fieldset>
		<legend>贷款信息</legend>
	<form class="layui-form" action="">
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">姓名:</label>
				<div class="layui-input-inline">
					<input type="text" id="JKRXM" name="JKRXM" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline" >
				<label class="layui-form-label">证件号码:</label>
				<div class="layui-input-inline">
					<input type="text" name="JKRZJH" id="JKRZJH" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline" >
				<label class="layui-form-label">单位名称:</label>
				<div class="layui-input-inline">
					<input type="text" id="DWMC" name="DWMC" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline" >
				<label class="layui-form-label" >公积金账号:</label>
				<div class="layui-input-inline">
					<input type="text" id="JKRGJJZH" name="JKRGJJZH" autocomplete="off"
						class="layui-input">
				</div>
			</div>
		</div>
	</form>
		
<!-- 
	<form class="layui-form" action="">
		<div class="layui-form-item">
			<div class="layui-inline" style="width:30%">
				<label class="layui-form-label">姓名:</label>
				<div class="layui-input-inline">
					<input type="text" name="JKRXM" id="JKRXM" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline" style="width:30%">
				<label class="layui-form-label">证件号码:</label>
				<div class="layui-input-inline">
					<input type="text" name="JKRZJH" id="JKRZJH" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline" style="width:30%">
				<label class="layui-form-label">公积金账号:</label>
				<div class="layui-input-inline">
					<input type="text" name="JKRGJJZH" id="JKRGJJZH" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline" style="width:30%">
				<label class="layui-form-label">单位名称:</label>
				<div class="layui-input-inline">
					<input type="text" name="DWMC" id="DWMC" autocomplete="off"
						class="layui-input">
				</div>
			</div>
		</div>
	</form> 
    <form class="layui-form" action="">
		<div class="layui-form-item">
			<div class="layui-inline" style="width:30%">
				<label class="layui-form-label">贷款账号:</label>
				<div class="layui-input-inline">
					<input type="text" name="DKZH" id="DKZH" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline" style="width:30%">
				<label class="layui-form-label">业务流水号:</label>
				<div class="layui-input-inline">
					<input type="text" name="YWLSH" id="YWLSH" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline" style="width:30%">
				<label class="layui-form-label">借款人公积金账号:</label>
				<div class="layui-input-inline">
					<input type="text" name="JKRGJJZH" id="JKRGJJZH" autocomplete="off"
						class="layui-input">
				</div>
			</div>
		</div>
	</form>

	<form class="layui-form" action="">
		<div class="layui-form-item">
			<div class="layui-inline" style="width:30%">
			<label class="layui-form-label">贷款发放额:</label>
				<div class="layui-input-inline">
					<input type="text" name="DKFFE" id="DKFFE" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline" style="width:30%">
				<label class="layui-form-label">贷款期数:</label>
				<div class="layui-input-inline">
					<input type="text" name="DKQS" id="DKQS" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline" style="width:30%">
				<label class="layui-form-label">回收本金总额:</label>
				<div class="layui-input-inline">
					<input type="text" name="HSBJZE" id="HSBJZE" autocomplete="off"
						class="layui-input">
				</div>
			</div>
		</div>
	</form>

	<form class="layui-form" action="">
		<div class="layui-form-item">
			<div class="layui-inline" style="width:30%">
				<label class="layui-form-label">贷款发放日期:</label>
				<div class="layui-input-inline">
					<input type="text" name="DKFFRQ" id="DKFFRQ" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline" style="width:30%">
				<label class="layui-form-label">当期计划还款金额:</label>
				<div class="layui-input-inline">
					<input type="text" name="DQJHHKJE" id="DQJHHKJE" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline" style="width:35%">
				<label class="layui-form-label">还款账号:</label>
				<div class="layui-input-inline">
					<input type="text" name="HKZH" id="HKZH" autocomplete="off"
						class="layui-input">
				</div>
			</div>
		</div>
	</form>


	<form class="layui-form" action="">
		<div class="layui-form-item">
			<div class="layui-inline" style="width:30%">
				<label class="layui-form-label">贷款状态:</label>
				<div class="layui-input-inline">
					<input type="text" name="phone" id="DKSTATUS" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline" style="width:30%">
				<label class="layui-form-label">个人缴存情况:</label>
				<div class="layui-input-inline">
					<input type="text" name="GRJCQK" id="GRJCQK" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline" style="width:35%">
				<label class="layui-form-label">联系电话:</label>
				<div class="layui-input-inline">
					<input type="text" name="email" id="LXDH" autocomplete="off"
						class="layui-input">
				</div>
			</div>
		</div>
	</form>


	<form class="layui-form" action="">
		<div class="layui-form-item">
			<div class="layui-inline" style="width:30%">
				<label class="layui-form-label">罚息总额:</label>
				<div class="layui-input-inline">
					<input type="text" name="FXZE" id="FXZE" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline" style="width:35%">
				<label class="layui-form-label">贷款还款方式:</label>
				<div class="layui-input-inline">
					<input type="text" name="DKHKFS" id="DKHKFS" autocomplete="off"
						class="layui-input">
				</div>
			</div>
		</div>
	</form> -->
	</fieldset>
	<script type="text/javascript" src="../../../layui/lay/modules/layer.js"></script>
	<script type="text/javascript" src="../../../layui/layer.ext.js"></script>
	<script>
		layui.use('element', function() {
			var $ = layui.jquery, element = layui.element;
		});
	</script>
	<script type="text/javascript">
	function getPath() {  
	     return 'http://'+location.host;
	}	
	</script>
	<script src="../../../layui/jquery-3.2.1.min.js" charset="utf-8"></script>
	<script type="text/javascript">
		$(function(){
			$.ajax({
				url :getPath()+ '/wsyyt/dqdkcontrller/test',
				method : 'post',
				dataType : 'JSON',
				success : function(result) {
				var data = result.data;
					if(result.code==0){
						$.each(data[0], function(key, value) {
							$("#" + key).val(value);
						});
					}else{
						layer.msg('提示：'+result.CW,{icon: 5});	
					}
				}
			});
		});
	</script>
	<script type="text/javascript">
		$(function(){
			$('input').attr("readonly","readonly");
		});
	</script>
	<fieldset>
		<legend>历史贷款</legend>
	
	<div ng-app="myApp" ng-controller="customersCtrl" align="center">
		<table class="layui-table" style="width:90%" id="test">
			<tr align="center" style="background-color:#f1f1f1">
				<td>借款人姓名</td>
				<td>借款人证件号</td>
				<td>合同贷款金额</td>
				<td>贷款期数</td>
				<td>贷款发放日期</td>
				<td>贷款状态</td>
				<td>贷款结清日期</td>
				<td>操作</td>
			</tr>
		
			<tr ng-repeat="x in names" align="center" >

				<td >{{ x.JKRXM }}</td>
				<td >{{ x.JKRZJH }}</td>
				<td >{{ x.HTDKJE}}</td>
				<td >{{ x.DKQS }}</td>
				<td >{{ x.DKFFRQ}}</td>
				<td >{{ x.DKSTATUS}}</td>
				<td >{{ x.DKJQRQ}}</td>
				<td  ng-hide="true">{{ x.YWLSH}}</td>
				<td ng-if="x.DKSTATUS == '还款中'">			
					<a class="layui-btn layui-btn-xs" lay-event="edit" onclick="zxhk()">在线还款</a>
					<a class="layui-btn layui-btn-xs" lay-event="edit" onclick="yuqi(this)">逾期信息</a>
					<a class="layui-btn layui-btn-xs" lay-event="edit" onclick="hkjl()">还款记录</a>
					<a ng-if="x.SFWT == '0'" class="layui-btn layui-btn-xs" lay-event="edit" onclick="wtzy()">委托逐月</a>
				</td>
				<td ng-if="x.DKSTATUS == '结清贷款'">
					<a class="layui-btn layui-btn-xs" lay-event="edit" onclick="yuqi(this)">逾期信息</a>
					<a class="layui-btn layui-btn-xs" lay-event="edit" onclick="hkjl()">还款记录</a>
					<a ng-if="x.SFWT == '0'" class="layui-btn layui-btn-xs" lay-event="edit" onclick="wtzy()">委托逐月</a>
				</td>
			</tr>

		</table>
	</div>
	</fieldset>
	<script src="../../../js/angular.js"></script>
	<script type="text/javascript" src="../../../layui/lay/modules/layer.js"></script>
	<script src="../../../layui/layui.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../../dwwsyyt/dw/gjjhbj/fy.js"></script>
	<script>
		layui.use('element', function() {
			var $ = layui.jquery, element = layui.element; //Tab的切换功能，切换事件监听等，需要依赖element模块
		});
		function yuqi(){
			layer.open({
			   type: 2,
			   title: '新增收货地址',
			   shadeClose: true,//点击阴影关闭
			   shade: 0.8,
			   area: ['900px', '60%'],
			   content: getPath()+'/wsyyt/grwsyyt/gr/wddk/dqdkxx.html'
			});
		}
	</script>
	<script type="text/javascript">
	function getPath() {     
	        return 'http://'+location.host;
	}	
	</script>
	<script type="text/javascript" src="../../../layui/lay/modules/layer.js"></script>
	<script type="text/javascript" src="../../../layui/layer.ext.js"></script>
	<script>
			var a;
			var app = angular.module('myApp', []);
		    app.controller('customersCtrl', function($scope, $http) {
			$http.get(getPath() + "/wsyyt/lishicontroller/test").then(
					function(res) {
						$scope.data = res.data.data;//自己打断点看格式:[{},{}]
								if(res.data.code==1){
									layer.msg('提示：'+res.data.CW,{icon: 5});	
									return null;
								}
								console.log(res)	
								a = res.data.CNT;
								feny($scope.data);
								setTimeout(function(){
								$("#test tr:odd").attr("style","background:white"); 						
								$("#test tr:even").attr("style","background:#f1f1f1"); 
								},1000)
														
						});	
			});
		</script>
<script type="text/javascript" src="../../../layui/jquery-3.2.1.min.js"></script>
	<script type="text/javascript">
			 function getPath(){
				return 'http://'+location.host;
		     };
	</script>
	<script type="text/javascript">
			$(function(){
	    		$.ajax({
					url : getPath()+'/wsyyt/jcjbqkcontroller/test',
					method : 'post',
					dataType : 'JSON',
					success : function(result) {
						var data = result.data;
						$("#XINGMING").html("欢迎"+"【"+data[0].XINGMING+"】"+"登录网上营业厅");
					},
				});
			});
			$("#tclogin").click(function(){
				window.location.href =getPath()+'/wsyyt/login/login.html';
			});
		</script>
		<script type="text/javascript">
			 //===逾期信息===//
			function yuqi(obj) {
				var x = $(obj).parent().parent().find("td");  
				var y = x.eq(7).text();
				layer.open({
	            type: 2,
	            title: false,
	            closeBtn: 0, //不显示关闭按钮
	            shade: [0],
	            area: ['0px', '0px'],
	            offset: 'auto', //右下角弹出
	            time: 1, 
	            content: ['test/guodu.html', 'no'], //iframe的url，no代表不显示滚动条
	            end: function(){ //此处用于演示
		                layer.open({
		                    type: 2,
		                    title: '逾期信息',
		                    shadeClose: true,
		                    shade: false,
		                    maxmin: true, //开启最大化最小化按钮
		                    area: ['100%', '100%'],
		                    content: getPath()+'/wsyyt/grwsyyt/gr/wddk/yqxx.html?word='+y
		                });
	            	}	
	        	});
		    };
		     //===在线还款===//
			function zxhk() {
				layer.open({
	            type: 2,
	            title: false,
	            closeBtn: 0, //不显示关闭按钮
	            shade: [0],
	            area: ['0px', '0px'],
	            offset: 'auto', //右下角弹出
	            time: 1, 
	            content: ['test/guodu.html', 'no'], //iframe的url，no代表不显示滚动条
	            end: function(){ //此处用于演示
		                layer.open({
		                    type: 2,
		                    title: '在线还款',
		                    shadeClose: true,
		                    shade: false,
		                    maxmin: true, //开启最大化最小化按钮
		                    area: ['100%', '100%'],
		                    content: getPath()+'/wsyyt/grwsyyt/gr/wddk/zxhk.html'
		                });
	            	}	
	        	});
		    };
		      //===还款记录===//
			function hkjl() {
				layer.open({
	            type: 2,
	            title: false,
	            closeBtn: 0, //不显示关闭按钮
	            shade: [0],
	            area: ['0px', '0px'],
	            offset: 'auto', //右下角弹出
	            time: 1, 
	            content: ['test/guodu.html', 'no'], //iframe的url，no代表不显示滚动条
	            end: function(){ //此处用于演示
		                layer.open({
		                    type: 2,
		                    title: '还款记录',
		                    shadeClose: true,
		                    shade: false,
		                    maxmin: true, //开启最大化最小化按钮
		                    area: ['100%', '100%'],
		                    content: getPath()+'/wsyyt/grwsyyt/gr/wddk/hkmx.html'
		                });
	            	}	
	        	});
		    };
		     //===委托逐月===//
			function wtzy() {
				layer.open({
	            type: 2,
	            title: false,
	            closeBtn: 0, //不显示关闭按钮
	            shade: [0],
	            area: ['0px', '0px'],
	            offset: 'auto', //右下角弹出
	            time: 1, 
	            content: ['test/guodu.html', 'no'], //iframe的url，no代表不显示滚动条
	            end: function(){ //此处用于演示
		                layer.open({
		                    type: 2,
		                    title: '委托逐月',
		                    shadeClose: true,
		                    shade: false,
		                    maxmin: true, //开启最大化最小化按钮
		                    area: ['100%', '100%'],
		                    content: getPath()+'/wsyyt/grwsyyt/gr/wddk/wtzy.html'
		                });
	            	}	
	        	});
		    };
		</script>
</body>
</html>